﻿using WeDonekRpc.CacheClient.Cache;
using WeDonekRpc.CacheClient.Interface;
using WeDonekRpc.CacheClient.Local;
using WeDonekRpc.CacheClient.Memcached;
using WeDonekRpc.CacheClient.Redis;
using WeDonekRpc.Client;
using WeDonekRpc.Client.Interface;

namespace RpcCacheModular
{
    public class CacheModular : IRpcInitModular
    {
        public void Init (IIocService ioc)
        {

        }
        public void Load (RpcInitOption option)
        {
            _ = option.Ioc.RegisterInstance<IAsyncRedisCache>(new AsyncRedisCacheController());
            _ = option.Ioc.RegisterInstance<IMemcachedController>(new MemcachedService());
            _ = option.Ioc.RegisterInstance<IRedisController>(new RedisCacheController());
            _ = option.Ioc.RegisterInstance<ILocalCacheController>(new LocalCacheService());
            _ = option.Ioc.RegisterInstance<ICacheController>(new CacheController());
            _ = option.Ioc.RegisterInstance<IRedisCache>(new RedisCache());
            _ = option.Ioc.RegisterInstance<ICasMemcachedCache>(new CasMemcachedCache());
        }
        public void InitEnd (IIocService service)
        {
        }

    }
}